#include <stdio.h>
#include <stdbool.h>
#include <ctype.h>
#define SIZE 100
bool is_palindrome(char [], int n);
int main(void)
{
    char msg[SIZE];
    printf("Enter a message: ");
    char ch;
    int i;
    for (i = 0; i < SIZE && (ch = getchar()) != '\n';) {
        ch = tolower(ch);
        if (ch >= 'a' && ch <= 'z')
            msg[i++] = ch;
    }
    if (is_palindrome(msg, i))
        printf("Palindrome\n");
    else
        printf("Not a palindrome\n");
    return 0;
}
bool is_palindrome(char msg[], int n) {
    for (int i = 0, j = n - 1; i < j; i++, j--) 
        if (msg[i] != msg[j])
            return false;
    return true;
}